home *** CD-ROM | disk | FTP | other *** search
/ Trading on the Edge / Trading On The Edge - CD-ROM Toolkit (Wayzata Technology)(2031)(1994).bin / mac / Mac_Files / Vendor Demos / NeuralWare folder / nw2v50 / recirc.ins < prev    next >
Text File  |  1993-08-23  |  4KB  |  140 lines

  1. inst4.1        ! 14-Sept-88  (recirc.ins) Recirculation Network Builder
  2. !****************************************************************
  3. !*                                *
  4. !*    Recirculation Network Generator                *
  5. !*                                *
  6. !****************************************************************
  7.  
  8. !    *** check that input / output PE count is non-zero
  9.  
  10. ?&In    1
  11. >bge    CheckHid
  12. @Err    "Recirculation Network MUST have at least one input PE"
  13. :CheckHid
  14. ?&Hd1    1
  15. >bge    HidOK
  16. @Err    "Recirculation Network MUST have at least one hidden PE"
  17. :HidOK
  18.  
  19. !    *** Load the Control Strategy and LRS if needed
  20.  
  21. @LdCS    "recirc"        !control strategy
  22. @LdLR    "recirc"        !L/R schedule
  23.  
  24. =netn    "InstaNet (tm) Recirculation Network version 1.00 26-08-88"
  25. =DLnF    0            !learn  re-display off
  26. =DRcF    0            !recall re-display off
  27.  
  28. !    *** Build the Input Layer ***
  29.  
  30. @LLdf                !load default layer to mi_layer structure
  31. =LDln    "In"            !layer name
  32. =Lpes    &In            !copy # of input PEs from menu
  33. =x    100            !place to put layer on screen
  34. =y     60
  35. #Incl    "stdnwgtf.iif"        !standard # weight fields
  36. @LAdd                !add the input layer
  37.  
  38. !    *** Build the Visible layer ***
  39.  
  40. @LLdf                !start with default layer again
  41. =LDln    "Visible"        !layer name
  42. =Lpes    &In            !copy # of input PEs from menu
  43. =Ltrn    "Sigmoid"        !transfer function - could also be linear
  44. =Llrn    "Cum-Delta-Rule"    !Cumulative delta
  45. +y    60            !up higher on display
  46. #Incl    "stdnwgtf.iif"        !standard # weight fields
  47. @LAdd
  48.  
  49. !    *** Connect Visible Layer to Input Layer ***
  50.  
  51. =SPEl    LayN            !current layer
  52. @SlPE                !select it as destination (sb already)
  53. =NPEl    0            !input layer
  54. @NrPE
  55. =cnwt    1.0            !connection weight
  56. =cnty    WSet            !set weights
  57. =cnsc    WAbs            !absolute
  58. @LCCr                !correspondingly connect to input layer
  59. =n0    LayN            !save current layer for later
  60.  
  61. !    *** Build the Hidden layer ***
  62.  
  63. @LLdf                !start with default layer again
  64. =LDln    "Hidden"        !layer name
  65. =Lpes    &Hd1            !Proper number of PEs
  66. =Ltrn    "Sigmoid"        !transfer function
  67. =Llrn    "Cum-Delta-Rule"    !Cumulative delta
  68. +y    60            !up higher on display
  69. #Incl    "stdnwgtf.iif"        !standard # weight fields
  70. @LAdd
  71.  
  72. !    *** Connect hidden layer to visible layer and bias
  73.  
  74. =cnwt    0.0            !zero weights to start
  75. =cnty    WVar            !variable
  76. =SPEl    LayN            !hidden destination
  77. @SlPE
  78. =NPEl    n0            !visible source
  79. @NrPE
  80. @LCFl                !visible layer to hidden layer
  81. =NPEl    -1            !Bias Source
  82. @NrPE
  83. @LCFl                !Bias to hidden
  84. =n1    LayN            !track hidden layer
  85.  
  86. !    *** Connect visible layer to hidden layer and bias
  87.  
  88. =cnwt    0.0            !zero weights to start
  89. =cnty    WVar            !variable
  90. =SPEl    n0            !visible destination
  91. @SlPE
  92. =NPEl    n1            !hidden source
  93. @NrPE
  94. @LCFl                !hidden layer to visible layer
  95. =NPEl    -1            !Bias Source
  96. @NrPE
  97. @LCFl                !Bias to visible
  98.  
  99. !    *** Build the output layer & connect it to visible layer ***
  100.  
  101. @LLdf                !load default layer to mi_layer structure
  102. =LDln    "Out"            !layer name
  103. =Lpes    &In            !copy # of input PEs from menu
  104. +y    70
  105. #Incl    "stdnwgtf.iif"        !standard # weight fields
  106. @LAdd                !add the output layer
  107. =SPEl    LayN            !output layer
  108. @SlPE
  109. =NPEl    n0            !Visible layer
  110. @NrPE
  111. =cnty    WFix
  112. =cnwt    1.0
  113. @LCCr
  114.  
  115. !    *** Select Control Strategy & L/R Schedule ***
  116.  
  117. @LLsl                !load super layer
  118. =Lctl    "recirc"        !control strategy
  119. =Llrs    "recirc"        !L/R Schedule
  120. =Llnn    "recirc"        !name of learn input
  121. =Lrcn    "recirc"        !name of recall output
  122. #Incl    "stdioset.iif"        !standard I/O settings
  123. =Lax1    Epch            !set epoch from dialog
  124. +Lflg    LAAs            !auto-associative network
  125. =Lscl     0            !input  low-value
  126. =Loff     1            !input  high-value
  127. =Llow     0            !output low-value
  128. =Lhgh     1            !output high-value
  129. @SVsl                !save it back
  130. !
  131. =Grph     1
  132. =GrLF    "recirc"        !instrument list file
  133. !
  134. =jogl    -.5            !lower limit for jog
  135. =jogh    +.5            !upper limit for jog
  136. =seed    257            !starting seed number
  137. @seed                !set the seed
  138. @Nrnd                !randomize the network
  139. @EOF
  140.